package top.jojoace.GlobalExceptionAdvice_And_AutoURI.core.configuration;

import org.springframework.boot.autoconfigure.web.servlet.WebMvcRegistrations;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
import top.jojoace.GlobalExceptionAdvice_And_AutoURI.core.hack.AutoPrefixUrlMapping;


/**
 * <h1>实现AutoURL</h1>
 * <h2>实现WebMvcRegistrations接口，并注入类中,重写MRequestMappingHandlerMapping</h2>
 */
@Component
public class AutoPrefixConfiguration implements WebMvcRegistrations {
    @Override
    public RequestMappingHandlerMapping getRequestMappingHandlerMapping() {
        return new AutoPrefixUrlMapping();
    }
}
